home *** CD-ROM | disk | FTP | other *** search
- Frequently Asked Questions (FAQS);faqs.523
-
-
-
- Archive-name: tv/abbrevs
-
- [Last change - 11/30/92]
- [Changes since last posting - Added new abbreviations for Highlander (HL),
- Forever Knight (FK), and Babylon 5 (B5).
- Deleted abbreviations for shows no longer on
- the air: Eerie, Indiana (EEI) and Parker
- Lewis Can't Lose (PLCL). (If Parker Lewis
- hasn't been cancelled, it will need a new
- abbreviation anyway.)]
-
- Rec.arts.tv is a high volume newsgroup with a wide variety of discussed
- topics. However, a few topics generate more traffic than others. In order
- to allow those who use rn or some other method of pre-selecting articles to
- filter out (or save away) postings about these heavy traffic subjects, an
- abbreviation scheme has been created. Please help out by starting your
- subject line with one of the following abbreviations when posting about
- these topics. For example:
-
- Subject: NX - Dancing Bears
-
- or
-
- Subject: QL: Scott Bakula is PERFECT
-
- New abbreviations will be added as needed. Send suggestions directly to
- me, and I'll add them to the list. Objections to any abbreviations should
- probably be posted so that a consensus may be reached. Old abbreviations
- will be deleted when no longer necessary.
-
- B5 - Babylon 5
- DN - Dinosaurs
- FK - Forever Knight
- HL - Highlander
- LAL - LA Law
- L&O - Law and Order
- MWC - Married With Children
- MB - Murphy Brown
- MST - Mystery Science Theatre 3000
- NX - Northern Exposure
- QL - Quantum Leap
- RD - Reasonable Doubts
- SMP - The Simpsons
- SNL - Saturday Night Live
- WKRP - WKRP in Cincinnati
- WY - Wonder Years
- YIJ - The Young Indiana Jones Chronicles
-
- Some of these shows and as well as others are also discussed on various alt
- groups and mailing lists. These are detailed as completely as possible in
- "TV Discussion Groups, Etc." which is posted periodically to rec.arts.tv.
- --
-
- Melissa
- mwauford@utkvx.utk.edu
-
- Xref: bloom-picayune.mit.edu comp.lang.tcl:2075 news.answers:4539
- Newsgroups: comp.lang.tcl,news.answers
- Path: bloom-picayune.mit.edu!enterpoop.mit.edu!spool.mu.edu!caen!malgudi.oar.net!chemabs!lvirden
- From: lvirden@cas.org (Larry W. Virden)
- Subject: comp.lang.tcl Frequently Asked Questions (1/3)
- (Last updated: November 8, 1992)
- Message-ID: <tcl.p1_724079551@cas.org>
- Followup-To: comp.lang.tcl
- Summary: A regular posting of the comp.lang.tcl Frequently Asked Questions
- (FAQ) and their answers. This is the first of three parts.
- Originator: lwv26@lwv26aws
- Keywords: tcl, extended tcl, tk, expect
- Sender: lvirden@cas.org
- Supersedes: <tcl.p1_721227419@cas.org>
- Reply-To: lvirden@cas.org (Larry W. Virden)
- Organization: Chemical Abstracts Service
- Date: Fri, 11 Dec 1992 13:12:40 GMT
- Approved: news-answers-request@MIT.Edu
- Expires: Sun, 24 Jan 1993 13:12:31 GMT
- Lines: 308
-
- Archive-name: tcl-faq/part1
- Version: 2.5
- Last-modified: November 8, 1992
-
-
- Index of questions:
-
- 0. Origin of the comp.lang.tcl FAQ information.
- 1. What is Tcl? Tk? Extended Tcl? How does Tcl compare against language
- XXX?
- 2. Do these packages run on my machine?
- a. Unix
- b. MacOS
- c. MS-DOS
- d. VMS
- 3. Other than C, What languages can talk to tcl/tk?
- a. Shell
- b. C++
- c. Modula-3
- 4. Is there a bibliography of material relating to these programs?
- 5. Where do I report problems, bugs, or enhancements - or -
- What is comp.lang.tcl?
- 6. Where can I find the FAQ and who do I contact for more information
- about it?
-
- End of FAQ Index
-
- ------------------------------
- Subject: -0- Origin of the comp.lang.tcl FAQ information.
-
- The information in this set of FAQs comes from 3 sources. The primary
- source of information is the group itself - I spent (much too much) time
- each month culling through what I feel are some of the best answers,
- gathering up new information on ports, etc. and adding it here. I also
- gather together new application information and add it as best I can.
- The next most predominant source of information comes from the authors
- of the various software packages. Finally, a small amount comes from
- my personal experiences.
-
- I am always on the search for folk to assist in the maintenance of these
- FAQs. In fact, if you feel that you would like to coordinate this
- effort, PLEASE let me know!
-
- Subject: -1- What is Tcl? Tk? Extended Tcl? How does Tcl compare
- against language XXX?
-
- Tcl (version 6.4) stands for ``tool command language'' and is
- pronounced ``tickle.'' It is actually two things: a language and a
- library. First, Tcl is a simple textual language, intended primarily
- for issuing commands to interactive programs such as text editors,
- debuggers, illustrators, and shells. It has a simple syntax and is
- also programmable, so Tcl users can write command procedures to provide
- more powerful commands than those in the built-in set.
-
- Second, Tcl is a library package that can be embedded in
- application programs. The Tcl library consists of a parser for the Tcl
- language, routines to implement the Tcl built-in commands, and
- procedures that allow each application to extend Tcl with additional
- commands specific to that application. The application program
- generates Tcl commands and passes them to the Tcl parser for
- execution. Commands may be generated by reading characters from an
- input source, or by associating command strings with elements of the
- application's user interface, such as menu entries, buttons, or
- keystrokes. When the Tcl library receives commands it parses them into
- component fields and executes built-in commands directly. For commands
- implemented by the application, Tcl calls back to the application to
- execute the commands. In many cases commands will invoke recursive
- invocations of the Tcl interpreter by passing in additional strings to
- execute (procedures, looping commands, and conditional commands all
- work in this way).
-
- An application program gains three advantages by using Tcl for
- its command language. First, Tcl provides a standard syntax: once
- users know Tcl, they will be able to issue commands easily to any
- Tcl-based application. Second, Tcl provides programmability. All a
- Tcl application needs to do is to implement a few application-specific
- low-level commands. Tcl provides many utility commands plus a general
- programming interface for building up complex command procedures. By
- using Tcl, applications need not re-implement these features. Third,
- extensions to Tcl, such as the Tk toolkit, provide mechanisms for
- communicating between applications by sending Tcl commands back and
- forth. The common Tcl language framework makes it easier for
- applications to communicate with one another.
-
- Tk 2.3 - an extension to Tcl which provides the programmer with
- an interface to the X11 windowing system. Note that many users will
- encounter Tk via the ``wish'' command. Wish is a simple windowing
- shell which permits the user to write Tcl applications in a prototyping
- environment.
-
- Extended Tcl (tclX) 6.4c-p1 - This extended set of commands are
- provided by NeoSoft, and provide additional Unix system interfaces to
- the Tcl programmer. Many users will encounter Tcl via the ``tcl''
- command - an interactive Tcl command interpreter.
-
- ?? I do not have any info written yet for the language comparisons ??
-
- ------------------------------
- Subject: -2- Do these packages run on my machine?
-
- a. Unix
-
- Tcl runs on Suns and SunOS, DECstations running Ultrix, Dec
- VAXen running Ultrix or BSD, 386s running SCO Unix, Xenix, Bell-Tech,
- Silicon Graphics running IRIX, HPs running HP-UX, Sequent Symmetry
- running Dynix. See the porting section below for info on porting the
- code to VMS as well.
-
- Tk (being based on Tcl) requires X11R4 or better as the only additional
- software requirement.
-
- b. MacOS
-
- Contact W. Ross Brown <ross@bnr.ca> for the current status of
- the Tcl MacOS port. Ross has a mailing list for discussion on that
- topic. Also, "Eric W. Sink" <e-sink@uiuc.edu> is working on a port
- which includes some tclX extensions as well as some Mac-specific extensions.
-
- c. MS-DOS
-
- Two ports are available. One unsupported port of Tcl and Extended
- Tcl 6.0, done by "Karl Lehenbauer" <Karl@NeoSoft.com>, is available on
- barkley.berkeley.edu.
-
- The other port of TCL V6.2 was done by
- "John Martin" <johnm@cajal.uoregon.edu> and is available via FTP from
- cajal.uoregon.edu.
-
- d. VMS
-
- A port of TCL 6.2 and Tk 1.4 to VMS was done by Angel Li
- <angel@flipper.rsmas.miami.edu>. The files are
- mango.rsmas.miami.edu:pub/tcl-vms.bck.Z and
- mango.rsmas.miami.edu:pub/tk-vms.bck.Z
-
- and are compressed with the Unix compress command. The files are
- VMS BACKUP files.
-
-
- ------------------------------
- Subject: -3- Other than C, What languages can talk to tcl/tk?
-
- a. Shell
-
- There are two standard interfaces which are shell-like. The
- first is wish, which is a windowing shell like interface that is a part
- of the Tk package. The second is tcl, a line command interpreter that
- is part of the Extended TCL package.
-
- b. C++
-
- Check out tcl++.h in Extended Tcl. Based on an original
- implementation by Parag Patel, it defines a Tcl interpreter class by
- which Tcl interpreters can be created as objects under C++.
-
- Mark Diekhans and Karl Lehenbauer have used this, in
- combination with the handle facility in Extended Tcl, to build Tcl
- commands around C++ classes.
-
- The Tcl handle facility provides a way to manage table entries
- that can be referenced by a textual handle from Tcl code. This is
- provided for applications that need to create data structures in one
- command, return a reference (i.e. pointer) to that particular data
- structure and then access that data structure in other commands. An
- example application is file handles.
-
- A handle table was built containing pointers to the instances
- of a class that were to be accessed from Tcl, say a class `foo_cl', and
- then a "new" command defined that created an instance of that class and
- returned a Tcl handle to it. The handle could then passed among Tcl
- commands that accessed each member function. The handle is in effect
- an explicit `this' pointer.
-
- For example:
-
- set obj [foo_cl::new]
- foo_cl::baz $obj "Hello world"
- foo_cl::delete $obj
-
- It's not totally object-oriented, but it's still very usable.
-
- c. Modula-3
-
- Norman Ramsey <elan.uucp!nr> says:
-
- A long time back, Eric Muller posted a Modula-3 interface to
- the C TCL library. I wrote down a Modula-3/TCL interface that used
- Modula-3 types rather than C types, and that used objects to build
- closures for commands. I wrote part of the implementation but never
- finished it. I have mailed copies to carroll@udel.edu, who asked the
- question, and I will post them if there seems to be general interest.
-
- ------------------------------
- Subject: -4- Is there a bibliography of material relating to these
- programs?
-
- A. With the Tcl distribution there is a Postscript version of a Usenix
- paper introducing Tcl. With the Tk distribution, there is a Postscript
- version of a Usenix paper introducing Tk.
-
-
- Ousterhout, J.K., (1990) ``TCL: An Embeddable Command Language'', in
- the Proceedings of the 1990 Winter USENIX Conference, pp 133-146.
-
- Ousterhout, J.K., (1990) ``An X11 Toolkit Based on the TCL Language'',
- in the Proceedings of the 1991 Winter USENIX Conference, pp 105-115.
-
- Postscript file for introductory papers on Tcl and Tk are available in
- the public FTP area on sprite.berkeley.edu (Internet address
- 128.32.150.27). To retrieve them, ftp to sprite (login "anonymous",
- password "guest") and type the following commands:
-
- get tclUsenix90.ps
- get tkUsenix91.ps
- get tkF10.ps
-
- (The last of these files is the contents of Figure 10 of the Tk paper)
-
- If you have trouble retrieving the papers via FTP or printing them,
- send bmiller@sprite.berkeley.edu your U.S. Mail address and he'll mail
- you paper copies.
-
- B. With the Expect distribution, there are several Postscript documents
- available which have been published.
-
- "Curing Those Uncontrollable Fits of Interaction", Proceedings of the
- Summer 1990 USENIX Conference, Anaheim, CA, June 11-15, 1990. (This
- paper is discussion of implementation, philosophy, and design. It is
- pub/expect/seminal.ps.Z on ftp.cme.nist.gov.)
-
- "Using expect to Automate System Administration Tasks", Proceedings of
- the 1990 USENIX Large Systems Administration Conference (LISA) IV,
- Colorado Springs, CO, October 17-19, 1990. (This paper is discussion
- and examples, specifically aimed at system administrators. It is
- pub/expect/sysadm.ps.Z on ftp.cme.nist.gov.)
-
- "expect: Scripts for Controlling Interactive Programs", Computing
- Systems, Vol. 4, No. 2, University of California Press Journals, 1991.
- (A comprehensive paper of example scripts. This paper is
- pub/expect/scripts.ps.Z on ftp.cme.nist.gov.)
-
- C. A FrameMaker MIF file containing a Quick Reference guide to Tcl is
- available as barkley.berkeley.edu:/tcl/docs/QuickRef.tar.Z. Thanks to
- "Jeff Tranter" <Jeff.Tranter@software.mitel.com> for contributing it.
-
- D. PostScript versions of the man pages were provided by
- "Adrian Ho" <adrianho@barkley.berkeley.edu>. These are available on
- barkley.berkeley.edu:/tcl/docs/tcl6.3.manps.tar.Z
- barkley.berkeley.edu:/tcl/docs/tclX6.2b.manps.tar.Z
- barkley.berkeley.edu:/tcl/docs/tk2.1.manps.tar.Z
-
- E. An early draft of a text book based on Tcl and Tk, written by
- John Ousterhout and to be published in 1993 by Addison-Wesley is available as
- sprite.berkeley.edu:tcl/book.p1.ps.Z . It is about 130 pages in length.
- This is ONLY a draft.
-
- F. A series of PostScript versions of slides used in a tutorial on
- Tcl and Tk at the 1992 X Conference are available as
- sprite.berkeley.edu:tcl/talk[1-5].ps and tkSquare.c.
-
- Additional bibliographic references are still being sought.
-
- ------------------------------
- Subject: -5- Where do I report problems, bugs, or enhancements - or -
- What is comp.lang.tcl?
-
- There are two alternatives for reporting bugs and problems.
- The first is the USENET news group comp.lang.tcl, an unmoderated USENET
- newsgroup, created for the discussion of the Tcl programming language
- and tools that embed it, such as the Tk toolkit for the X window
- system, expect, and Extended Tcl. Please note that postings of source
- code to comp.lang.tcl do not get archived to barkley.berkeley.edu - if
- you want your code to be available from the User Contributions archive
- you will need to make arrangements for someone to ftp it there. See
- elsewhere in the FAQ for more details on the archive site.
-
- The second would be to report problems, suggestions, new
- ideas, etc. to the author. Email to
-
- ouster@allspice.berkeley.edu (John Ousterhout)
-
- will get comments to the author of Tcl and Tk - for other programs, email
- addresses are available either elsewhere in this part or part 3.
-
- Note: for those USENET-deprived individuals who are thus unable
- to read comp.lang.tcl, a small echoing mailing list is available.
- Contact John Ousterhout (see above for email address) for details.
-
- ------------------------------
- Subject: -6- Where can I find the FAQ and who do I contact for more
- information about it?
-
- I am going to attempt to keep a copy of this file up to date on
- barkley.berkeley.edu. Also, I will be posting it on a regular basis to
- at least comp.lang.tcl and news.answers.
-
- If you have corrections, enhancements, modifications,
- clarifications, suggestions, ideas, new questions, new answers to
- questions which have never been asked, or something else that I have
- not covered above, contact me at lvirden@cas.org.
- --
- Larry W. Virden UUCP: osu-cis!chemabs!lvirden
- Same Mbox: BITNET: lvirden@cas INET: lvirden@cas.org
- Personal: 674 Falls Place, Reynoldsburg, OH 43068-1614
- --
- Larry W. Virden UUCP: osu-cis!chemabs!lvirden
- Same Mbox: BITNET: lvirden@cas INET: lvirden@cas.org
- Personal: 674 Falls Place, Reynoldsburg, OH 43068-1614
- Xref: bloom-picayune.mit.edu comp.lang.tcl:2077 news.answers:4541
- Newsgroups: comp.lang.tcl,news.answers
- Path: bloom-picayune.mit.edu!enterpoop.mit.edu!spool.mu.edu!caen!malgudi.oar.net!chemabs!lvirden
- From: lvirden@cas.org (Larry W. Virden)
- Subject: comp.lang.tcl Frequently Asked Questions (2/3)
- (Last updated: November 8, 1992)
- Message-ID: <tcl.p2_724079551@cas.org>
- Followup-To: comp.lang.tcl
- Summary: A regular posting of the comp.lang.tcl Frequently Asked Questions
- (FAQ) and their answers. This is the second of three parts.
- Originator: lwv26@lwv26aws
- Keywords: tcl, expect, extended tcl, wish, tk
- Sender: lvirden@cas.org
- Supersedes: <tcl.p2_721227419@cas.org>
- Reply-To: lvirden@cas.org (Larry W. Virden)
- Organization: Chemical Abstracts Service
- References: <tcl.p1_724079551@cas.org>
- Date: Fri, 11 Dec 1992 13:13:31 GMT
- Approved: news-answers-request@MIT.Edu
- Expires: Sun, 24 Jan 1993 13:12:31 GMT
- Lines: 717
-
- Archive-name: tcl-faq/part2
- Version: 2.5
- Last-modified: November 8, 1992
-
- Please do not be offended if I neglect to acknowledge your contribution
- to this FAQ! I sometimes forget to put an attribution in. I especially
- try to add them if it appears that there is further experimentation or
- debugging being done though.
-
- Index of questions:
-
- 7. Questions on building Tcl and friends on your system
- Q7a. Is there anywhere I can find help with the details of getting
- Tcl to work on my machine?
- Q7b. When I am trying to build Tcl, the link step says that some
- of the functions Tcl needs are missing.
- Q7c. Has anyone built Tcl 6.2 on an RS/6000 AIX 3.1?
- Q7d. Has anyone gotten Tcl to compile under HP-UX?
- Q7e. Has anyone gotten Tcl to compile under VMS?
- Q7f. What does it take to get Tcl to compile under SCO Unix?
- Q7g. When I try to run the tclTest I get format and scan errors
- (NeXT, AIX, etc.)
- Q7h. When I try to run tcl v6.2 tclTest under Irix 4.0.1 I get
- lots of errors.
- Q7i. Does anyone else have problems with Tcl on a Cray?
- Q7j. Does anyone know how to get Tk to run on a SparcBook or other
- laptop with a limited number of colors?
- Q7k. What does it take to get Tcl/Tk to compile on 386bsd/Linux
- or other Posix/ANSI C systems not already supported?
-
- 8. How, in Tcl, can I XXX:
- Q8a. get association lists or property lists?
- Q8b. call one proc with the multi parameter value returned by
- another proc?
- Q8c. pass an array into a proc?
- Q8d. pipe output of a command back into a tcl parsing procedure?
- Q8e. merge extended Tcl into other programs such as wish or expect?
- Q8f. delete a procedure from within a script?
- Q8g. get parray to recognize an array variable I have created
- via upvar?
- Q8h. get more than 7 digits of double precision?
- Q8i. grab the command line whenever a non-built-in call is made?
-
- 9. How, in Tk, can I XXX:
- Q9a. get my wish application to execute - I just get a wish prompt!
- Q9b. get an application to also use libXt?
- Q9c. ,using a machine with less than 8 bit color, run?
- Q9d. set X11 resources for a wish application in an app-defaults file?
- Q9e. change the X11 cursor?
- Q9f. raise or lower a window?
- Q9g. re-map a withdrawn window id?
- Q9h. specify bitmap patterns on the command line instead of
- as a file name?
- Q9i. change the default class bindings?
- Q9j. delete a binding?
- Q9k. change a binding while it is being executed?
- Q9l. bind the arrow key on my Sun keyboard?
- Q9m. resize a listbox?
- Q9n. select two items that are not adjacent in the listbox at
- one time?
- Q9o. select items in more than one tk listbox at a time?
- Q9p. fill a canvas which is bounded by lines as opposed to a
- shape like a polygon, oval, etc.?
- Q9q. create a scrollable window of buttons?
-
- End of FAQ Index
-
- ------------------------------
- Subject: -7- Questions on building Tcl and friends on your system
-
- Subject: -Q7a- Is there anywhere I can find help with the details of
- getting Tcl to work on my machine?
-
- A7a. Glad you asked! Look in the Tcl distribution for the file called
- "porting.notes". This will contain a collection of notes that various people
- have provided about porting Tcl to various machines and operating systems.
- There are also a file called "README" which should be read FIRST - before
- doing anything else with the code (this should always be one's first
- step with any package). Finally, there is a "changes" file which details
- what has changed since the last release - be sure to read this to see
- what might need to change in your programs.
-
- Subject: -Q7b- When I am trying to build Tcl, the link step says that
- some of the functions Tcl needs (such as strtoul and
- strerror) are missing.
-
- A7b. Did you run the "config" program first, by doing a "csh ./config" or
- equivalent?
-
- Tcl includes equivalents for the following functions and include files
- which may not be found on some systems:
-
- dirent.h limits.h stdlib.h string.h
-
- opendir.c strerror.c strstr.c strtol.c strtoul.c
-
- strtod.c
-
- Subject: -Q7c- Has anyone built Tcl 6.x on an RS/6000 AIX 3.1?
-
- A7c. See porting notes - especially the note about strtoul.
-
- One user got Tcl to compile with a few minor source modifications
- (for example, duplicate case statements for errno and signal symbols in
- tclUnixStr.c).
-
- A few other problems arose in the tests. One is caused by AIX printf
- not formatting %#x and %#o correctly when the value to be printed is
- zero: they print "0x0" and "00" instead of "0" and "0" respectively.
- This was reported as not a problem in earlier releases. No fixes have
- been posted.
-
- Finally, a problem occurs in open.test. test 13.6 hangs because "cat"
- on the RS6000 is unbuffered. A workaround is to change the execution
- of "cat" in open.test to do a "cat -u".
-
- Dov Grobgeld <dov@menora.weizmann.ac.il> provided info on creating tcl
- and tk shared libraries under AIX 3.1.5:
-
- For tcl:
-
- cc -o tkshar.o *.o -bE:tclshar.exp -bM:SRE -berok -lX11 -lm
- ar r libtclshr tclshar.o
-
- For tk:
-
- cc -o tkshar.o *.o -bE:tkshar.exp -bM:SRE -berok -Ltcl -lX11 -lm -ltclshr
- ar r libtkshr tkshar.o
-
- where tckshar.exp and tkshar.exp had lists of the external functions.
-
- Subject: -Q7d- Has anyone gotten Tcl to compile under HP-UX?
-
- A7d. See the porting notes.
-
- Subject: -Q7e- Has anyone gotten Tcl to compile under VMS?
-
- A7e. Information from: derge@visacrd.ge.com (Gillmer J. Derge)
-
- Date: 8 Jan 92 13:44:18 GMT
- Reply-To: derge@crd.ge.com
- Organization: GE Corporate R&D Center, Schenectady, NY
-
- Here's a rough approximation of what I needed to do (pretty minor changes).
-
- 1. As discussed in the Makefile, do not compile the files that make
- UNIX_OBJS (panic.c, tclEnv.c, tclGlob.c, tclUnixAZ.c, tclUnixStr.c and
- tclUnixUtil.c). Furthermore, define the constant TCL_GENERIC_ONLY at
- compile-time.
-
- 2. Don't believe everything you read in Makefiles :-) --
- TCL_GENERIC_ONLY doesn't really work. You need to add an ifndef in
- tclCkalloc.c before the "#include tclUnix.h". Also, in tclExpr.c,
- there's a reference to TCL_NO_UNIX that should be changed to
- TCL_GENERIC_ONLY.
-
- 3. Finally, in order to run the test program (the test suite won't
- work, see below), you'll need to change the definition of initCmd in
- tclTest.c. I chose the following, which should be more or less
- compatible with non-VAX systems:
-
- #ifdef TCL_LIBRARY
- char *initCmd =
- "if [file exists [info library]/init.tcl] {source [info
- library]/init.tcl}";
- #else
- char *initCmd =
- "format {There is no Tcl library at this installation. Continuing
- anyway.\n
- }";
- #endif
-
- There are a number of caveats to all this. First of all, I did
- not port tk or Extended Tcl. Furthermore, I think there may have been
- a release that I missed since I did it (6.1 vs 6.0). Here's the RCS ID
- from my tclExpr.c, in case you want to compare yours.
-
- static char rcsid[] = "$Header: /sprite/src/lib/tcl/RCS/tclExpr.c,v 1.29\
- 91/09/04 15:08:28 ouster Exp $ SPRITE (Berkeley)";
-
- And perhaps most importantly of all, as you may have gleaned
- from the compilation instructions, I did not do anything to port the
- Unix-related functions. As a result, the standard test suite will not
- work. You have to just try commands on your own. I recently got mail
- from jkimball@src.honeywell.com (John Kimball) indicating that he may
- be working on just that problem.
-
- I've assumed a certain amount of C knowledge in the above. If
- that's an invalid assumption, or your confused for any other reason,
- let me know, and I'll try to clear things up. I'm guessing since you
- asked about porting tk and Extended Tcl that I probably haven't taken
- this as you would have liked, but maybe I've saved you at least a
- little effort. I hope so.
-
- Subject: -Q7f- What does it take to get Tcl to compile under SCO Unix?
-
- A7f. Add a "#undef select" to tkEvent.c, and remove the reference to
- TK_EXCEPTION around line 460 of main.c.
-
- Tk uses its own scheme for allocating the border colors for its 3D
- widgets, which causes problems when running TK on a system with
- "PseudoColor" display class, and a 16-cell colormap.
-
- If you can't go to eight bitplanes, you can instead start the server
- with a "-static" (Xsco) or "-analog" (Xsight) option, making the
- display class become "StaticColor". This makes the entire colormap
- read-only, and it will return the color that most closely maps to the
- desired color as possible.
-
- This information is from Keith Amann <Keith_Amann@stortek.com>
-
- Subject: -Q7g- When I try to run the tclTest I get format and scan errors
- (NeXT, AIX, etc.)
-
- A7g. That's a problem (scanf/printf) many systems seem to have. Don't
- worry too much about it - just don't use these 'advanced' features. If
- you're hacking C, you'll have the same problems.
-
- Subject: -Q7h- When I try to run tcl v6.2 tclTest under Irix 4.0.1 I get
- lots of errors.
-
- A7h. There's a bug in the 4.0.1 optimizer that's fixed in 4.0.2.
- Compile tclVar.c using -O0 (no optimization).
-
- Subject: -Q7i- Does anyone else have problems with Tcl on a Cray?
-
- A7i. See the porting notes for a set of changes mentioned. Also,
- Booker C. Bense <benseb@grumpy.sdsc.edu> reports that version 3.0.1.6
- has some real problems with char pointers, causing Tcl to crash. Using
- version 3.0.2.1, things are much better, except for a minor formatting
- problem and serious problems with scan.
-
- Subject: -Q7j- Does anyone know how to get Tk to run on a SparcBook or other
- laptop with a limited number of colors?
-
- A7j. On a SparcBook, if you start openwin (the OpenWindows server starting
- command) as:
-
- openwin -dev "/dev/fb staticvis"
-
- you get a static visual color model that Tk copes with better than the
- default. Some things are ugly, but not as ugly as monochrome.
-
- Subject: -Q7k- What does it take to get Tcl/Tk to compile on 386bsd/Linux
- or other Posix/ANSI C systems not already supported?
-
- A7k. Patches for 386BSD were posted to comp.lang.tcl back in Nov. 1992 to
- alt.sources. See one of the ftp archive sites for this group for them.
- Basically, there were some setting of defines and a few places where
- const char * had to be used in place of char *.
-
- ------------------------------
- Subject: -8- How, in Tcl, can I XXX:
-
- Subject: -Q8a- association lists or property lists?
-
- A8a. Use Extended Tcl arrays or keyed lists.
-
- For example, if you did a:
-
- keylset ttyFields ttyName tty1a
- keylset ttyFields baudRate 57600
- keylset ttyFields parity strip
-
- And then an "echo $ttyFields", you'd get:
-
- {ttyName tty1a} {baudRate 57600} {parity strip}
-
-
- Subject: -Q8b- call one proc with the multi parameter value returned by
- another proc?
-
- A8b. Assuming y requires multiple args and x returns multiple words, use
- Tcl's eval command "eval y [x]"
-
- Subject: -Q8c- pass an array into a proc?
-
- A8c. With upvar.
-
- set argc 2
- set argv(0) zero
- set argv(1) one
- # print elements of an array
- proc a {
- foreach element of a
- echo the element
- }
-
- proc a {arrayName} {
- upvar $arrayName myArray
-
- foreach element [array names myArray] {
- echo $element $myArray($element)
- }
- }
-
- Extended Tcl introduces a concept called keyed lists which are arrays
- made out of lists of key-value pairs and can be passed by value to routines,
- over networks, etc.
-
- Subject: -Q8d- pipe output of a command back into a tcl parsing
- procedure?
-
- A8d. For example, to grep a pattern out of a range of files, one might
- do:
-
- karl@NeoSoft.com (Karl Lehenbauer) writes:
-
- set files [glob /home/cole/stats/*]
-
- proc parseInfo { site } {
- global files
-
- #
- # site is chosen from a listbox earlier
-